import fetch from '@/utils/fetch';

// 漏损量Add
export function addFlCommunityLsl(obj) {
    return fetch({
        url: 'api/cb/flCommunityLsl',
        method: 'post',
        data: obj
    });
}

// 漏损量Delete
export function deleteFlCommunityLsl(idArr) {
    return fetch({
        url: 'api/cb/flCommunityLsl/del',
        method: 'delete',
        data: idArr
    });
}

// 漏损量修改
//api/cb/flCommunityLsl/{id}
export function modifyFlCommunityLsl(id, obj) {
    return fetch({
        url: 'api/cb/flCommunityLsl/' + id,
        method: 'put',
        data: obj
    })
}

// 漏损量搜索

export function searchFlCommunityLsl(page, size, obj) {
    return fetch({
        url: 'api/cb/flCommunityLsl/search/' + page + '/' + size,
        method: 'post',
        data: obj
    });
}

// 漏损量查看
export function getFlCommunityLsl(id) {
    return fetch({
        url: 'api/cb/flCommunityLsl/' + id,
        method: 'get'
    })
}

// 漏损量下载模板
export function downTem() {
    return fetch({
        url: 'api/cb/flCommunityLsl/exprotExcelModel',
        responseType: 'blob',
        method: 'get'
    })
}

// 漏损量导出
export function exprotXls(ids, obj) {
    return fetch({
        url: 'api/cb/flCommunityLsl/exprotXls/' + ids,
        responseType: 'blob',
        method: 'post',
        data: obj
    })
}

// 漏损量导入
export function importXls() {
    return fetch({
        url: 'api/cb/flCommunityLsl/importXls',
        method: 'post'
    })
}
